package net.csdn.business.auth.utils;

import org.springframework.context.support.MessageSourceAccessor;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;

import java.util.Locale;


/**
 * @Desc: i18n国际化转换util
 * @ClassName: SecurityMessageSourceUtil
 * @Author: yourleige@163.com
 * @Date: 2022/9/26 11:36
 */
public class SecurityMessageSourceUtil extends ReloadableResourceBundleMessageSource {

	public SecurityMessageSourceUtil() {
		setBasename("classpath:i18n/messages");
		setDefaultLocale(Locale.CHINA);
	}

	public static MessageSourceAccessor getAccessor() {
		return new MessageSourceAccessor(new SecurityMessageSourceUtil());
	}

}